import { requestAjax } from "./config.js";

// 会员权益
export const levelList = (data) => {
  return requestAjax("/api/v1/member/level/list", data, "GET");
};

// 会员信息
export const get_member_info = (data) => {
  return requestAjax("/api/v1/member/get/" + data.id, {}, "GET");
};

// 徽章
export const receivedBadgeList = (data) => {
  return requestAjax("/api/v1/userInfo/receivedBadgeList", data, "GET");
};
// 已核销门票数量
export const destroyTicketNumber = (data) => {
  return requestAjax("/api/v1/userInfo/destroyTicketNumber", data, "GET");
};
// 已完成路线数量
export const doneLineNumber = (data) => {
  return requestAjax("/api/v1/userInfo/doneLineNumber", data, "GET");
};
// 已点亮展具徽章数量
export const lightZjBadgeNumber = (data) => {
  return requestAjax("/api/v1/userInfo/lightZjBadgeNumber", data, "GET");
};
// 成长报告
export const growthReport = (data) => {
  return requestAjax("/api/v1/userInfo/growthReport", data, "GET");
};
// 积分商城列表
export const integralList = (data) => {
  return requestAjax("/api/v1/pointsMall/user/pageList", data, "GET");
};
// 积分商城详情
export const integralDetails = (data) => {
  return requestAjax("/api/v1/pointsMall/user/detail/" + data.id, {}, "GET");
};
// 积分商城兑换
export const pointsMallExchange = (data) => {
  return requestAjax(
    "/api/v1/pointsMall/user/pointsMallExchange",
    data,
    "POST"
  );
};

// 消费记录
export const consumeList = (data) => {
  return requestAjax("/api/v1/member/consumeList", data, "GET");
};

// 意见反馈
export const feedback = (data) => {
  return requestAjax("/api/v1/feedback/add", data, "POST");
};

// 编辑个人信息
export const memberEdit = (data) => {
  return requestAjax("/api/v1/member/edit", data, "POST");
};
// 新增宝宝信息
export const addBaby = (data) => {
  return requestAjax("/api/v1/member/baby/addBaby", data, "POST");
};
// 编辑宝宝信息
export const editBaby = (data) => {
  return requestAjax("/api/v1/member/baby/editBaby", data, "POST");
};
// 集满徽章领取奖励【含实物与优惠券】
export const receiveReward = (data) => {
  return requestAjax("/api/v1/userInfo/receiveReward", data, "POST");
};
// 获取最近一张年卡的到期时间
export const getLastYcExpiredTime = (data) => {
  return requestAjax("/api/v1/userInfo/getLastYcExpiredTime", data, "GET");
};

// 扫码领取路线徽章
export const linescanReceiveBadge = (data) => {
  return requestAjax("/api/v1/line/user/scanReceiveBadge", data, "POST");
};
// 集满徽章领取奖励记录
export const badgeReceiveRewardList = (data) => {
  return requestAjax("/api/v1/userInfo/badgeReceiveRewardList", data, "GET");
};

// 集满徽章领取奖励记录
export const dataStatistics = (data) => {
  return requestAjax("/api/v1/userInfo/dataStatistics", data, "GET");
};

// 我的兑换记录
export const myExchangeList = (data) => {
  return requestAjax("/api/v1/pointsMall/user/myExchangeList", data, "GET");
};
// 上传展具拍摄图片
export const uploadPic = (data) => {
  return requestAjax("/api/v1/line/user/uploadPic", data, "POST");
};

// 机构管理-apis		->	机构用户端-机构详情【/api/v1/org/user/get/{id}】
export const getOrgInfo = (data) => {
  return requestAjax(`/api/v1/org/user/get/${data.id}`, {}, "GET");
};

// 机构管理-apis		->	移动端-机构列表【/api/v1/org/user/list】
export const orgList = (data) => {
  return requestAjax(`/api/v1/org/user/list`, data, "GET");
};
// 注：旅行社相关功能还未迁移，可以先屏蔽，等后端接口更新在对接
// 用户端-根据手机号查询作为员工关联的景区列表  mobile
export const getOrgListByMobile = (data) => {
  return requestAjax(`/api/v1/travel/staff/getOrgListByMobile`, data, "GET");
};
//通用-旅行社员工分销数据统计 员工id travelStaffId  startTime  endTime
export const staffOrderStatistics = (data) => {
  return requestAjax(
    `/api/v1/orderTravelRatio/staffOrderStatistics`,
    data,
    "GET"
  );
};
